package com.yuma.threads;

class Window extends Thread{
    public Window(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + "窗口卖出了第" + (i+1) + "张票");
        }
    }
}

public class ThreadDemo {
    public static void main(String[] args) {
        Thread t1 = new Window("A");
        Thread t2 = new Window("B");
        Thread t3 = new Window("C");
        t1.start();
        t2.start();
        t3.start();
    }
}
